﻿using Avalonia.Data.Converters;
using Avalonia.Platform.Storage;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 畜牧业审核程序国产.Models.PreReview
{
    internal class ChosenEnableConvertor : IValueConverter
    {
        public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
        {
            //if (value is IStorageFile file)
            //{
            //    return file != null;
            //}
            //return false;
            if (value is string filePath)
            {
                return filePath != null;
            }
            return false;
        }

        public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
